_devicesChanged: function() {
this._proxy.GetRemote('Icon', Lang.bind(this, function(icon, error) {
if (icon) {
- let gicon = Shell.util_icon_from_string (icon);
+ let gicon = Gio.icon_new_for_string(icon);
this.setGIcon(gicon);
this.actor.show();
} else {
this._box = new St.BoxLayout({ style_class: 'popup-device-menu-item' });
this._label = new St.Label({ text: this._deviceTypeToString(device_type) });
- this._icon = new St.Icon({ gicon: Shell.util_icon_from_string(icon),
+ this._icon = new St.Icon({ gicon: Gio.icon_new_for_string(icon),
icon_type: St.IconType.SYMBOLIC,
style_class: 'popup-menu-icon' });
// FIXME: We don't have a 'chat room' icon (bgo #653737) use
// system-users for now as Empathy does.
let source = new ApproverSource(dispatchOp, _("Invitation"),
- Shell.util_icon_from_string('system-users'));
+ Gio.icon_new_for_string('system-users'));
Main.messageTray.add(source);
let notif = new RoomInviteNotification(source, dispatchOp, channel, contacts[0]);
// We got the TpContact
let source = new ApproverSource(dispatchOp, _("Call"), isVideo ?
- Shell.util_icon_from_string('camera-web') :
- Shell.util_icon_from_string('audio-input-microphone'));
+ Gio.icon_new_for_string('camera-web') :
+ Gio.icon_new_for_string('audio-input-microphone'));
Main.messageTray.add(source);
let notif = new AudioVideoNotification(source, dispatchOp, channel, contacts[0], isVideo);
return g_themed_icon_new ("gtk-file");
}
-/**
- * shell_util_icon_from_string:
- * @string: a stringified #GIcon
- *
- * A static method equivalent to g_icon_new_for_string, workaround
- * for GJS not being able to represent Gio.Icon (which is an interface,
- * not a class).
- *
- * Returns: (transfer full): the icon which is represented by @string
- */
-GIcon *
-shell_util_icon_from_string (const char *string, GError **error)
-{
- return g_icon_new_for_string (string, error);
-}
-
static void
stop_pick (ClutterActor *actor,
const ClutterColor *color)
char *shell_util_get_label_for_uri (const char *text_uri);
GIcon *shell_util_get_icon_for_uri (const char *text_uri);
-GIcon *shell_util_icon_from_string (const char *string,
- GError **error);
void shell_util_set_hidden_from_pick (ClutterActor *actor,
gboolean hidden);